package sgt.onlinetest.hibernatedao;

import java.util.List;

import org.hibernate.Session;
import org.hibernate.criterion.Expression;
import sgt.onlinetest.entity.Test;

public class HibernateTestDAO extends HibernateGenericDAO<Test, Long>{

    public HibernateTestDAO(Session session) {
        super(session);
    }

    public List<Test> getTestByMarker(String markerName) {
        return getSession().createCriteria(Test.class).add(Expression.eq("marker.name", markerName)).list();
    }
}
